// https://www.luogu.com.cn/problem/B2064

#include <stdio.h>


int main() {
    int n;
    scanf("%d", &n);
    int ans[31];
    ans[0] = ans[1] = 1;
    for (int i=2; i<31; i++) {
        ans[i] = ans[i-1] + ans[i-2];
    }
    int t;
    for (int i=0; i<n; i++) {
        scanf("%d", &t);
        printf("%d\n", ans[t-1]);
    }
    return 0;
}